function routerController(app) {
    const fs = require('fs')
    let files = fs.readdirSync(__dirname + '/routers')
    let js_files = files.filter((f) => {
        return f.endsWith('.js')
    })

    for (var f of js_files) {
        console.log(`process controller: ${f}...`)
        let router= require(__dirname + '/routers/' + f)
        app.use(router.routes())
    }
}

module.exports = routerController